// 通过统一配置的getter得到数据
// 同级目录modules是为了区分不同模块的store仓库
const getters = {
  sidebar: state => state.app.sidebar,
  device: state => state.app.device,
  token: state => state.user.token,
  avatar: state => state.user.avatar,
  name: state => state.user.name,
  userinfo: state => state.user.userinfo,
  ImgTitleId(state){
    const data = state.titleOrPicture.allIdinfo
    console.log(data)
    let newdata = []
    data.forEach((item) => {
        const {id,title} = item
        const newobj = {id,title}
        newdata.push(newobj)
    });
    return newdata
}
}
export default getters
